import Vue from "vue";
import VueRouter from "vue-router";
// import { component } from "vue/types/umd";


Vue.use(VueRouter)

const router = new VueRouter({
    routes: [
        {
            path: '/',
            redirect: "/index"
        },
        {
            name: "index",
            path: "/index",
            //懒加载组件
            component: () => import("@/views/Index.vue"),
            // redirect:"/login"
        },
        {
            name: "Newslist",
            path: "/Newslist",
            component: () =>
                import("@/views/Newslist.vue")
        },
        {
            name: "NewsDetial",
            path: "/NewsDetial/:newid",
            component: () =>
                import("@/views/NewsDetial.vue"),

        },      
        {
            name: "photoSharing",
            path: "/photoSharing",
            component: () => import("@/views/photoSharing.vue")
        },
        {
            name: "ImageDetails",
            path: "/ImageDetails/:id",
            component: () => import("@/views/ImageDetails.vue")
        },
        {
            name: "brandManagement",
            path: "/brandManagement",
            component: () => import("@/views/brandManagement.vue")
        }
        // {
        //     name:"login",
        //     path:"/login",
        //     //懒加载组件
        //     component: ()=> import("@/views/Login.vue"),
        //     // redirect:"/login"
        // }]
    ]
    // },


})
export default router